package com.rem.controller;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author remembrance
 * @version 1.0
 * @date 2021/11/17 17:53
 */
@ControllerAdvice
public class ErrorController {

    @ExceptionHandler(ArithmeticException.class)
    @ResponseBody
    public String error(){
        return "success";
    }
}
